package com.coolw.spring.statemachine.support;

import com.coolw.spring.statemachine.enums.MachineIdEnum;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.statemachine.StateMachine;

/**
 * 状态机构建抽象类
 *
 * @author coolw
 * @date 2024/4/18 10:04
 */
public abstract class AbstractStateMachineBuilder<S extends BaseState, E extends BaseEvent> {

    /**
     * 状态机商户ID
     */
    public abstract MachineIdEnum getMachineId();

    /**
     * 构建状态转换事件关系
     */
    public abstract StateMachine<S, E> builder(BeanFactory beanFactory) throws Exception;
}
